
# def sleep():
#     import time
#     import random
#     print("睡觉中...")
#     time.sleep(random.randint(1, 5))
    

# def outer(func):
#     def inner():
#         print("想睡觉...")
#         func()
#         print("睡醒了...")
#     return inner

# fn = outer(sleep)
# fn()


def outer(func):
    def inner():
        print("想睡觉...")
        func()
        print("睡醒了...")
    return inner

@outer
def sleep():
    import time
    import random
    print("睡觉中...")
    time.sleep(random.randint(1, 5))
    

sleep()